<?php

/**
 * Description of Cookie
 *
 * @author dan
 */
class Cookie {
    
    private static $instance = null;
    
    private function __construct() {}
    
    /**
     * return Cookie
     */
    public static function getInstance(){
        if(self::$instance == null){
            self::$instance = new Cookie();            
        }
        return self::$instance;
    }
    
    public function set($key, $value){
        setcookie($key, $value);
    }
    
    public function get($key){
        if(isset($_COOKIE[$key])){
            return $_COOKIE[$key];
        }
        return false;
    }
    
}